//
//  LYRecomendCell.m
//  SelectCity
//
//  Created by liuyan on 2019/3/13.
//  Copyright © 2019年 liuyan. All rights reserved.
//

#import "LYRecomendCell.h"

@interface LYRecomendCell()

@property (nonatomic, strong) UILabel *titleLabel;

@end

@implementation LYRecomendCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self initSubViews];
        self.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    return self;
}

#pragma mark - InitSubViews
- (void)initSubViews{
    self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, WIDTH, 45)];
    self.titleLabel.font = Font(Font_13);
    self.titleLabel.textColor = THEMECOLOR_OF_TEXT_666666;
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
    [self.contentView addSubview:self.titleLabel];
}

- (void)setDataDic:(NSDictionary *)dataDic isSelect:(BOOL)isSelect {
   self.titleLabel.text = dataDic[@"name"];
    if (isSelect) {
        self.titleLabel.textColor = THEMECOLOR_OF_ORANGE;
    } else {
        self.titleLabel.textColor = THEMECOLOR_OF_TEXT_666666;
    }
}

- (void)reloadData:(PublicCategoryElementModel *)model isSelect:(BOOL)isSelect {
    self.titleLabel.text = model.name;
    if (isSelect) {
        self.titleLabel.textColor = THEMECOLOR_OF_ORANGE;
    } else {
        self.titleLabel.textColor = THEMECOLOR_OF_TEXT_666666;
    }
}

@end
